<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewDepartmentEntityTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_name}"/>
                    <h:outputText value="#{departmentEntityController.selected.name}" title="#{bundle.ViewDepartmentEntityTitle_name}"/>
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_manager}"/>
                    <h:outputText value="#{departmentEntityController.selected.manager}" title="#{bundle.ViewDepartmentEntityTitle_manager}"/>
                    
                    <h:outputText value="Employees"/>
                    <h:dataTable value="#{departmentEntityController.selected.employees}" var="employee" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="name"/>
                            </f:facet>
                            <h:outputText value="#{employee.name}"/>
                        </h:column>
                    </h:dataTable>
                          
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_id}"/>
                    <h:outputText value="#{departmentEntityController.selected.id}" title="#{bundle.ViewDepartmentEntityTitle_id}"/>
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_createdAt}"/>
                    <h:outputText value="#{departmentEntityController.selected.createdAt}" title="#{bundle.ViewDepartmentEntityTitle_createdAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_createdBy}"/>
                    <h:outputText value="#{departmentEntityController.selected.createdBy}" title="#{bundle.ViewDepartmentEntityTitle_createdBy}"/>
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_lastModifiedAt}"/>
                    <h:outputText value="#{departmentEntityController.selected.lastModifiedAt}" title="#{bundle.ViewDepartmentEntityTitle_lastModifiedAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewDepartmentEntityLabel_lastModifiedBy}"/>
                    <h:outputText value="#{departmentEntityController.selected.lastModifiedBy}" title="#{bundle.ViewDepartmentEntityTitle_lastModifiedBy}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{departmentEntityController.destroyAndView}" value="#{bundle.ViewDepartmentEntityDestroyLink}"/>
                <br />
                <br />
                <h:commandLink action="Edit" value="#{bundle.ViewDepartmentEntityEditLink}"/>
                <br />
                <h:commandLink action="#{departmentEntityController.prepareCreate}" value="#{bundle.ViewDepartmentEntityCreateLink}" />
                <br />
                <h:commandLink action="#{departmentEntityController.prepareList}" value="#{bundle.ViewDepartmentEntityShowAllLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ViewDepartmentEntityIndexLink}" action="/index" immediate="true" />

            </h:form>
        </ui:define>
    </ui:composition>

</html>
